<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>template三种模板</title>
    <script type="text/javascript" src="../assests/js/vue.js"></script>
</head>
<body>
    <h1>template三种模板</h1>
    <hr>
    <div id="app">
        {{ message }}
    </div>
    <!-- <p><h2>我是template模板</h2></p> -->
    <template id="tpl2">
        <div><h2 style="color:red;">我是template标签模板</h2></div>
    </template>
    <script type="x-template" id="tpl3">
        <div><h2 style="color:red;">我是script标签模板</h2></div>
    </script>
    <script>
        var app = new Vue({
            el:"#app",
            data:{
                message:"hello world!"
            },
            template:"#tpl3"
            // template:`<div><h2 style="color:red;">我是template模板</h2></div>`
        });
    </script>
</body>
</html>